package com.haixiaoke.saas.enterprise.order.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.haixiaoke.saas.common.annotation.Log;
import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.core.page.TableDataInfo;
import com.haixiaoke.saas.common.enums.BusinessType;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.common.utils.poi.ExcelUtil;
import com.haixiaoke.saas.order.domain.OrderHousingExpenses;
import com.haixiaoke.saas.order.service.IOrderHousingExpensesService;
import com.haixiaoke.saas.system.BaseController;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单每日房费详情Controller
 * 
 * @author panda
 * @date 2024-04-03
 */
@RestController
@RequestMapping("/enterprise/order/expenses")
public class EnterpriseOrderHousingExpensesController extends BaseController {
    @Autowired
    private IOrderHousingExpensesService orderHousingExpensesService;

    /**
     * 查询订单每日房费详情列表
     */
    @TenantScope
    @GetMapping("/list")
    public TableDataInfo list(OrderHousingExpenses orderHousingExpenses) {
        startPage();
        orderHousingExpenses.setTenantId(TenantContext.getTenantId());
        List<OrderHousingExpenses> list = orderHousingExpensesService.selectOrderHousingExpensesList(orderHousingExpenses);
        return getDataTable(list);
    }
}
